package com.ruicar.afs.cloud.workflow.api.dto.afsprocess.request;

import cn.hutool.core.date.DatePattern;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
public class FlowExceptionRequest {

    @JSONField(name = "Id")
    @JsonProperty("Id")
    private String exceptionId;


    @JSONField(name = "afsFlowKey")
    @JsonProperty("afsFlowKey")
    private String afsFlowKey;


    @JSONField(name = "serviceId")
    @JsonProperty("serviceId")
    private String serviceId;

    @JSONField(name = "dataId")
    @JsonProperty("dataId")
    private String bizDataId;

    @JSONField(name = "flowId")
    @JsonProperty("flowId")
    private String flowId;

    @JSONField(name = "finsId")
    @JsonProperty("finsId")
    private String flowInstanceId;

    @JSONField(name = "taskId")
    @JsonProperty("taskId")
    private String taskNodeId;


    @JSONField(name = "tinsId")
    @JsonProperty("tinsId")
    private String taskId;


    @JSONField(name = "status")
    @JsonProperty("status")
    // 流程状态 // 0 正在运行 1 成功运行 -1 失败 -2 因异常中止 4 已废弃
    private String status;



    @JSONField(name = "cDate",format = "yyyy-MM-dd HH:mm:ss")
    @JsonProperty("cDate")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date exceptionOccDate;



    @JSONField(name = "processDate",format = "yyyy-MM-dd HH:mm:ss")
    @JsonProperty("processDate")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date lastInstanceProcessTime;


    @JSONField(name = "waitCallback")
    @JsonProperty("waitCallback")
    // 0等待回调 1 回调完成
    private String waitCallback;


    @JSONField(name = "callbackDate",format = "yyyy-MM-dd HH:mm:ss")
    @JsonProperty("callbackDate")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date callbackDate;


    @JSONField(name = "message")
    @JsonProperty("message")
    private String message;
}
